package cc.ilzy.mall.constants;

public class CommonConstants {
    public class CacheKey {
        /**
         * 注册验证码, 第一个是类型, 第二个是接受的号码
         */
        public static final String CHECK_CODE_KEY = "code:%s:%s";

        /**
         * 购物车缓存的key, 第一个是用户ID
         */
        public static final String CART_KEY = "cart:%s";
    }
    /**
     * 发送验证码类型枚举
     */
    public enum SendCodeEnum{
        REGISTER(1, "注册"),
        LOGIN(2, "登录"),
        RESET_PASSWORD(3, "重置密码");

        private final Integer code;
        private final String message;

        SendCodeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }

        public Integer getCode() {
            return code;
        }

        public String getMessage() {
            return message;
        }
    }
}
